function [dataout,ElementIndicies4Target] = ReorderColumnsOnly(datain, Elements_In,targetElements)
[A,ElementIndicies4Target] = ismember(upper(targetElements), upper(Elements_In));

noData = find(ElementIndicies4Target==0);
ElementIndicies4Target(ElementIndicies4Target == 0) = max(ElementIndicies4Target);
dataout = datain(:,ElementIndicies4Target);
%pads rows of NaNs for elements with missing data
dataout(:,noData)=[NaN];  

end

